<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div data-widget-name="menu">Choose the genre</div>
    <script>
        //编写代码，从文档（document）中获取带有 data-widget-name特性（attribute）的元素，并读取它的值。
        var div = document.querySelector('div');
        console.log(div.getAttribute('data-widget-name'));
    </script>
</body>
</html>